'use strict';

const Service = require('egg').Service;

class MessageService extends Service {

	get tbname(){
		return 'yz_message'
	}

	async list(param){
		const list = this.app.mysql.select(this.tbname, {
			where:{ status: 1},
			orders:[['id', 'desc']],
			limit: param.pageSize,
			offset: (param.pageNum - 1) * param.pageSize,
		});

		return list;
	}

}

module.exports = MessageService;